All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.qd.QDPoint
java.lang.Object
|
+----quicktime.qd.QDPoint
- public final class QDPoint
- extends Object
- implements PrimitivesLib, Cloneable
-
kIsFixedPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
-
kIsGXPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
-
kIsQ3Point2D
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
-
kIsQTVRFloatPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
-
QDPoint(float, float)
- Create a QDPoint at specified location
-
QDPoint(int, int)
- Create a QDPoint at specified location
-
QDPoint(Point)
- Create a QDPoint at specified location
-
clone()
- Return a copy of the QDPoint
-
copy()
- Returns a copy of the QDPoint with the correct return type.
-
equals(Object)
- Checks whether two int points are equal.
-
fromArray(byte[], int)
- Creates a QDPoint from an array of bytes that represent a FixedPoint, so the
byte array must be 8bytes long at least.
-
fromArray(byte[], int, int)
- Creates a QDPoint from an array of bytes that represent a FixedPoint, so the
byte array must be 8bytes long at least.
-
getEndianDescriptorFixedPoint()
- Returns the EndianDescriptor for FixedPoint point.
-
getEndianDescriptorQTVRFloatPoint()
- Returns the EndianDescriptor for TQ3Point2D point.
-
getEndianDescriptorTQ3Point2D()
- Returns the EndianDescriptor for TQ3Point2D point.
-
getFixedPoint()
- Returns a byte array that contains the packed value of a FixedPoint
-
getGXPoint()
- Returns a byte array that contains the packed value of a GXPoint
-
getPoint()
- Returns the QDPoint packed into a 32bit integer
-
getQ3Point2D()
- Returns a byte array that contains the packed value of a 3Point2D
-
getQTVRFloatPoint()
- Returns a byte array that contains the packed value of a QTVRFloatPoint
-
getX()
-
Get the x location of the point.
-
getXF()
-
Get the x location of the point.
-
getY()
-
Get the y location of the point.
-
getYF()
-
Get the y location of the point.
-
move(float, float)
- Moves the point, to coordinates x, y.
-
move(int, int)
- Moves the point, to coordinates x, y.
-
setX(float)
-
Set the x location of the point.
-
setX(int)
-
Set the x location of the point.
-
setY(float)
-
Set the y location of the point.
-
setY(int)
-
Set the y location of the point.
-
toPoint()
- Convert to java.awt.Point
-
toString()
- Returns the String representation of this QDPoint's coordinate.
-
translate(float, float)
- Translates the point, by deltaX and deltaY.
-
translate(int, int)
- Translates the point, by deltaX and deltaY.
kIsFixedPoint
public static final int kIsFixedPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
kIsGXPoint
public static final int kIsGXPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
kIsQ3Point2D
public static final int kIsQ3Point2D
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
kIsQTVRFloatPoint
public static final int kIsQTVRFloatPoint
- These constants are used in the fromArray call to indicate
which of the 2 formats the byte array is encoded in.
QDPoint
public QDPoint(int x,
int y)
- Create a QDPoint at specified location
- Parameters:
- x - x location
- y - y location
QDPoint
public QDPoint(float x,
float y)
- Create a QDPoint at specified location
- Parameters:
- x - x location
- y - y location
QDPoint
public QDPoint(Point origin)
- Create a QDPoint at specified location
- Parameters:
- point - location of point
getEndianDescriptorFixedPoint
public static final EndianDescriptor getEndianDescriptorFixedPoint()
- Returns the EndianDescriptor for FixedPoint point.
- Returns:
- an EndianDescriptor
getEndianDescriptorTQ3Point2D
public static final EndianDescriptor getEndianDescriptorTQ3Point2D()
- Returns the EndianDescriptor for TQ3Point2D point.
- Returns:
- an EndianDescriptor
getEndianDescriptorQTVRFloatPoint
public static final EndianDescriptor getEndianDescriptorQTVRFloatPoint()
- Returns the EndianDescriptor for TQ3Point2D point.
- Returns:
- an EndianDescriptor
fromArray
public static QDPoint fromArray(byte ptBytes[],
int ptType)
- Creates a QDPoint from an array of bytes that represent a FixedPoint, so the
byte array must be 8bytes long at least.
- Parameters:
- ptBytes - the byte array containing the packed point values
- ptType - the type of point to be found in the array
- Returns:
- a QDPoint
- Throws: IllegalArgumentException
- if mismatch between minimum length of byte array and format flag
fromArray
public static QDPoint fromArray(byte ptBytes[],
int ptType,
int offset)
- Creates a QDPoint from an array of bytes that represent a FixedPoint, so the
byte array must be 8bytes long at least.
- Parameters:
- ptBytes - the byte array containing the packed point values
- ptType - the type of point to be found in the array
- offset - the offset in the array where the point is to be found
- Returns:
- a QDPoint
- Throws: IllegalArgumentException
- if mismatch between minimum length of byte array and format flag
getPoint
public int getPoint()
- Returns the QDPoint packed into a 32bit integer
getGXPoint
public byte[] getGXPoint()
- Returns a byte array that contains the packed value of a GXPoint
getFixedPoint
public byte[] getFixedPoint()
- Returns a byte array that contains the packed value of a FixedPoint
getQ3Point2D
public byte[] getQ3Point2D()
- Returns a byte array that contains the packed value of a 3Point2D
getQTVRFloatPoint
public byte[] getQTVRFloatPoint()
- Returns a byte array that contains the packed value of a QTVRFloatPoint
getX
public int getX()
- Get the x location of the point.
- Returns:
- the current x location
getXF
public float getXF()
- Get the x location of the point.
- Returns:
- the current x location
setX
public void setX(int x)
- Set the x location of the point.
- Parameters:
- x - the new x location
setX
public void setX(float x)
- Set the x location of the point.
- Parameters:
- x - the new x location
getY
public int getY()
- Get the y location of the point.
- Returns:
- the current y location
getYF
public float getYF()
- Get the y location of the point.
- Returns:
- the current y location
setY
public void setY(int y)
- Set the y location of the point.
- Parameters:
- y - the new y location
setY
public void setY(float y)
- Set the y location of the point.
- Parameters:
- y - the new y location
translate
public void translate(int deltaX,
int deltaY)
- Translates the point, by deltaX and deltaY.
translate
public void translate(float deltaX,
float deltaY)
- Translates the point, by deltaX and deltaY.
move
public void move(int x,
int y)
- Moves the point, to coordinates x, y.
move
public void move(float x,
float y)
- Moves the point, to coordinates x, y.
equals
public boolean equals(Object obj)
- Checks whether two int points are equal.
- Overrides:
- equals in class Object
toString
public String toString()
- Returns the String representation of this QDPoint's coordinate.
- Overrides:
- toString in class Object
toPoint
public Point toPoint()
- Convert to java.awt.Point
clone
public Object clone()
- Return a copy of the QDPoint
- Returns:
- a QDPoint
- Overrides:
- clone in class Object
copy
public QDPoint copy()
- Returns a copy of the QDPoint with the correct return type.
- Returns:
- a QDPoint
All Packages Class Hierarchy This Package Previous Next Index